// src/scripts/syncDatabase.js
const { sequelize } = require('../config/database');

async function syncAllModels() {
  try {
    await sequelize.sync({ alter: true });
    console.log('✅ 数据库结构已与模型同步（alter模式）');
    process.exit(0);
  } catch (err) {
    console.error('❌ 数据库结构同步失败:', err);
    process.exit(1);
  }
}

syncAllModels();